from codeManage.fun.fun import input_validation, inputbox, wfile, scode1
from fun import fun
from menu import menu
from fun import *

import os, time, string, random, tkinter, qrcode
from pystrich.ean13 import EAN13Encoder
import tkinter.filedialog
import tkinter.messagebox
from tkinter import *
from string import digits

root = tkinter.Tk()
number = "1234567890"
letter = "ABCDEFGHIJKLMNPQRSTUVWXYZ1234567890"
allis = "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*()_+"

randstr = []
fourth = []
fifth = []
randfir = ""
randsec = ""
randthr = ""
str_one = ""
strone = ""
strtwo = ""
nextcard = ""
userput = ""
nres_letter = ""


def main():
    i = 0
    while i < 9:
        menu.mainMenu()
        choice = input("\033[1;32m 请输入您要操作的菜单选项:\33[0m")

        if len(choice) != 0:
            choice = input_validation(choice)

            if choice == 1:
                scode1(str(choice), root, randstr)
            if choice == 2:
                scode2(str(choice))
            if choice == 3:
                scode3(str(choice))
            if choice == 4:
                scode4(str(choice))
            if choice == 5:
                scode5(str(choice))
            if choice == 6:
                scode6(str(choice))
            if choice == 7:
                scode7(str(choice))
            if choice == 8:
                scode8(str(choice))
            if choice == 9:
                scode9(str(choice))
            if choice == 0:
                i = 0
                print("正在退出系统!!")
        else:
            print("\033[1;31;40m 输入非法，请重新输入！！\033[0m")
            time.sleep(2)


def scode2(choice):
    return


def scode3(choice):
    return


def scode4(choice):
    return


def scode5(choice):
    return


def scode6(choice):
    return


def scode7(choice):
    return


def scode8(choice):
    return


def scode9(choice):
    return


if __name__ == "__main__":
    main()
